<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Inv_onhand extends CI_Controller {

	public function __construct(){
		parent::__construct();
		$this->load->model('wus');
		$this->load->model($this->session->userdata('formodel'));
		$this->load->library('variable');
	}

	public function index(){

	  $this->load->view('layouts/header',$this->variable->load_data($this->session->userdata('title')));
	  $this->load->view($this->session->userdata('formain'));
	  $this->load->view('layouts/footer');
	}
	public function add_form(){
				$this->load->view($this->session->userdata('foradd'),array(
					));
	}
	public function edit_form($id){

			$this->load->view($this->session->userdata('foredit'),array(
				));
		
	}
	public function view_form($id){
			$this->load->view($this->session->userdata('forview'),array(
				
				));
	}


	public function search_OH(){
		$query = $this->inv_onhand_model->get_onhand_data($this->input->post('OH_item_num'));
		if(!empty($query)) {
			echo json_encode($query);
			}else{
				echo json_encode("none");
			}
	}

	
	 
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */